<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" type="text/css" href="../../css/style.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/demo.css"/>
		<script src="../../js/demo.js" type="text/javascript" charset="utf-8"></script>
		<title>登录侨盟</title>
	</head>
	<body>
		<!--header-->
		<div class="header">
			<div class="header-content">
				<ul class="nav left">
					<li><img src="../../img/regist-arrow.png"/></li> 
					<li class="nav-one"><a href="login-home.html">返回</a></li>
					<!-- ../../index.html,为什么要加../../? 路径是相对于login.html的../../就到项目根目录下啦 -->
					<li class="nav-two"><a href="login-home.html">关闭</a></li>
				</ul>
				<p class="left">登录侨盟</p>
				<div class="right nav_right">
					<img src="../../img/regist-list.png"/>
				</div>
			</div>
		</div>
		<!--main-->
		<div class="main clear">
			<form action="" >
				<div class="main-content">
					<div class="telephone">
						<label for="tel">
							<img src="../../img/regist-phone.png"/>
						</label>
						<input type="text" id="logintel" value="" name="phone" placeholder="输入手机号码"/>
					</div>	
				</div>
				<div class="main-content2">
					<div class="password">
						<label for="password">
							<img src="../../img/register-mima.png"/>
						</label>
						<input type="password" id="loginpsd" value="" name="password" placeholder="输入登录密码"/>
					</div>	
				</div>
				<span style="font-size: 25px;color: red; margin-left: 200px;" id="span2"></span>
				<input type="button" name="" onclick="login()" id="login-login" value="登录" class="login"/>
			</form>	
			<div class="forgetpsd">
				<a href="register-findpsd.html">忘记密码</a>
			</div>
			<div class="static-img">
				<img src="../../img/regist-back.png"/>
			</div>
			<div class="static-logo">
				<img src="../../img/login-logo.png"/>
			</div>
		</div>
		<script type="text/javascript" src="../../js/jquery-3.2.1.min.js"></script>
		<script type="text/javascript">
			function login(){
				var phone=$('#logintel').val();
				var password=$('#loginpsd').val();
				$.ajax({
					type:"post",
					url:"/qiaomengapp/user/login",
					data:"phone="+phone+"&password="+password,
					success:function(data){
						
						$('#span2').html(data);
						if(data==""){
							location="/qiaomengapp/index.html";
						}
					}
				});
			}	
		
		</script>
	</body>
</html>
